package com.fhz.mvvm;

import androidx.lifecycle.LiveData;

import com.fhz.mvvm.callback.ApiResponse;
import com.fhz.mvvm.entity.Banner;
import com.fhz.mvvm.entity.GoodsInfo;
import com.fhz.mvvm.entity.HUser;

import io.reactivex.Observable;
import retrofit2.Callback;
import retrofit2.http.Body;
import retrofit2.http.GET;
import retrofit2.http.POST;
import retrofit2.http.Path;
import retrofit2.http.Query;

/**
 * 时间:2023/8/17
 *
 * @author Mr.Feng
 * 简述: TODO
 */
public interface ServiceApi {

    @GET("banner/select")
    LiveData<ApiResponse<Banner>> getBanner(@Query("type") int type, @Query("page") int page, @Query("pageSize") int pageSize);


    @GET("goods/select/{page}/{pageSize}")
    LiveData<ApiResponse<GoodsInfo>> getGoodsInfo(@Path("page") int page, @Path("pageSize") int pageSize);


    @POST("/user/register")
    LiveData<ApiResponse<HUser>> register(@Body HUser hUser);


}
